#ifndef __ENDIAN_H__
#define __ENDIAN_H__

#include <byteswap.h>
#include <stdint.h>
#include <arpa/inet.h>
#include <type_traits>
#include <sys/types.h>


namespace johnsonli
{
        //uint64_t 网络转本地
    unsigned long long ntohll(unsigned long long val);
  
    
    //uint64_t 本地转网络
    unsigned long long htonll(unsigned long long val);
   

    uint16_t local_to_net16(uint16_t hostlong);
   

    uint16_t net_to_local16(uint16_t netlong);
    

    uint32_t local_to_net32(uint32_t hostlong);
    

    uint32_t net_to_local32(uint32_t netlong);
    

    uint64_t local_to_net64(uint64_t hostlong);
    

    uint64_t net_to_local64(uint64_t netlong);


    


}

#endif
